import { ElLoading } from 'element-plus'
// 初始化loading
let loadingInstance
// 显⽰loading的函数并且记录请求次数 ++
const showLoading = () => {
    loadingInstance = ElLoading.service({
        lock: true,
        text: '加载中……',
    })
}
// 隐藏loading的函数，并且记录请求次数 --
const hideLoading = () => {
    if (loadingInstance) loadingInstance.close()
}
export { showLoading, hideLoading }
